Type CreditManagerSimple Extends CreditManager

	Field counter:Int

	Method addCredit()
		counter:+1
	End Method
	
	Method removeCredit()
		counter:-1
		If counter < 0 Then
			counter = 0
		End If
	End Method
	
	Method setCredit(value:Int)
		counter = value
		If counter < 0 Then
			counter = 0
		End If
	End Method
	
	Method hasCredit:Int()
		Return counter > 0
	End Method
	
	Method getCredit:Int()
		Return counter
	End Method
	
End Type

